<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>分类系数设置</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        <a lay-href="/channel/list.action">渠道管理</a>&nbsp;/&nbsp;
        <zmn th:text="${obj == null ? '':obj.name}"/>&nbsp;/&nbsp;
        <a th:text="${T(com.zmn.plat.common.dictionary.ProductDict).getBizTypeCNENName(bizType)}" th:href="|/channel/priceList.action?channelId=${channelId}&addFlag=${addFlag}&bizType=${bizType}&priceType=${priceType}|">渠道价格</a> /
        <zmn th:text="${priceType == 1 ? '销售价': '内部价'}"></zmn>&nbsp;/&nbsp;
        <a th:href="|/channel/citypriceratio/list.action?channelId=${channelId}&addFlag=${addFlag}&bizType=${bizType}&priceType=${priceType}|">渠道城市系数</a> /
        <zmn th:text="${cityName}">城市名字</zmn> /
        <a th:href="|/channel/citypriceratio/categoryRatio.action?cityId=${cityId}&provinceId=${provinceId}&cityName=${cityName}&channelId=${channelId}&servCategId=${servCategId}&addFlag=${addFlag}&bizType=${bizType}&priceType=${priceType}|">分类系数</a>&nbsp;/&nbsp;
        <zmn th:text="${servCategName}">服务名称</zmn>
    </blockquote>

    <div class="layui-card">

        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item">
                <label class="layui-form-label">生效日期：</label>
                <div class="layui-input-inline">
                    <input type="text" id="effectiveDate" name="effectiveDate" placeholder="yyyy-MM-dd" class="layui-input"
                           autocomplete="off" readonly/>
                </div>
                <div class="layui-input-inline" style="width: 800px">
                    <div class="layui-form-mid">
                        <label style="color: #9F9F9F;width: 800px">生效日期选择后，配置的数据将在该日期的0点生效，不填则默认次日0：00生效 </label>
                    </div>
                </div>
            </div>
            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label style="font-weight:bolder" class="layui-form-label" th:text="${categOneName}+'：'"></label>
                <div class="layui-input-inline" style="width: 60px;">
                    <input id="categOneRatioInput" style="text-align:right;height: 30px" type="text" name="categOneRatio" th:value="${categOneToBeEffectiveValue == '' ? categOneValue:categOneToBeEffectiveValue}" autocomplete="off" class="layui-input"/>
                </div>
                <div class="layui-input-inline">
                    <input type="checkbox" name="citypriceratiobox" lay-filter="citypriceratiobox" title="应用到所有二级分类" lay-skin="primary">
                </div>
                <div class="layui-input-inline" style="margin-left:-30px;width: 800px">
                    <div class="layui-form-mid">
                        <label style="color: #9F9F9F;width: 800px">系数值范围 0.6~3.0，最多两位小数 </label>
                    </div>
                </div>
            </div>

            <hr class="layui-bg-gray">

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item">
                <th:block th:each="twoCategory : ${levelTwoRatio}">
                    <div class="layui-inline">
                        <label class="layui-form-label" th:text="${twoCategory.categName}+'：'"></label>
                        <div class="layui-inline" style="width: 60px;">
                            <input style="text-align:right;height: 30px" type="text" name="categTwoRatio" th:title="${twoCategory.categId}" th:value="${twoCategory.toBeEffectiveRatio == null ? twoCategory.ratio: twoCategory.toBeEffectiveRatio}" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                </th:block>
            </div>
            <!--按钮栏
                    置于form标签内的最下方，
                    主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                    -->
            <div class="layui-form-item submit">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary"  lay-submit="" lay-filter="zmn-form-reset">重置</button>
                </div>
            </div>

            <div class="layui-split">&nbsp;</div>
        </form>
    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        cityId: [[${cityId}]],
        provinceId: [[${provinceId}]],
        servCategId: [[${servCategId}]],
        categOneId: [[${categOneId}]],
        channelId: [[${channelId}]],
        bizType: [[${bizType}]],
        priceType: [[${priceType}]]
    };
    layui.config({
        base: "/static/lay/",
        version: 20200312
    }).extend({
        index: "lib/index",
        channel_city_price_category_ratio_edit: "channel/citypriceratio/zmn.plat.citypriceratio.categoryratio.edit",
    }).use(['index', 'channel_city_price_category_ratio_edit']);
</script>
</body>
</html>